<?
require_once("./include/db_info.inc.php");
require_once("./include/my_func.inc.php");
$err_str="";
$err_cnt=0;
$len; srand(20110619);
for ($i = 1; $i <= 199; $i++){
	$user_id = "hengsheng".str_pad($i,3,"0",STR_PAD_LEFT);
	$password = rand(100000, 999999);
	echo $user_id." ".$password."<br>";
/*	$password = MD5($password);
	$school = "Huazhong University of Science and Technology";
	$nick = $user_id;
	$sql="SELECT `user_id` FROM `users` WHERE `users`.`user_id` = '".$user_id."'";
	$result=mysql_query($sql);
	$rows_cnt=mysql_num_rows($result);
	mysql_free_result($result);
	if ($rows_cnt == 1){
	//	print "<script language='javascript'>\n";
	//	print "alert('User Existed!\\n');\n";
	//	print "history.go(-1);\n</script>";
		echo "<h1>User Existed!</br></h1>";
		echo "Click <a href='registerpage.php'>here</a> to go back!";
		exit(0);
	}
	$nick=$nick;
	$school=$school;
	$email=$email;
	$ip=$_SERVER['REMOTE_ADDR'];
	$sql="INSERT INTO `users`("
."`user_id`,`email`,`ip`,`accesstime`,`password`,`reg_time`,`nick`,`school`)"
."VALUES('".$user_id."','".$email."','".$_SERVER['REMOTE_ADDR']."',NOW(),'".$password."',NOW(),'".$nick."','".$school."')";
mysql_query($sql);// or die("Insert Error!\n");
	$sql="INSERT INTO `loginlog` VALUES('$user_id','$password','$ip',NOW())";
	mysql_query($sql);
*/
}
?>
